package org.whb.order.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.whb.basic.service.impl.BaseServiceImpl;
import org.whb.order.domain.AdoptOrder;
import org.whb.order.domain.OrderAddress;
import org.whb.order.mapper.AdoptOrderMapper;
import org.whb.order.mapper.OrderAddressMapper;
import org.whb.order.service.IOrderAddressService;

@Service
public class OrderAddressServiceImpl extends BaseServiceImpl<OrderAddress> implements IOrderAddressService {

    @Autowired
    private AdoptOrderMapper adoptOrderMapper;
    @Autowired
    private OrderAddressMapper orderAddressMapper;


    @Override
    public OrderAddress getOrderAdress(String paySn) {
        AdoptOrder adoptOrder = adoptOrderMapper.loadByPaySn(paySn);
        String orderSn = adoptOrder.getOrderSn();
        return orderAddressMapper.loadByOrderSn(orderSn);
    }
}
